1. Field of the Invention
The present invention relates to a magnetic sensor using a Hall element on a semiconductor substrate, and more particularly, to a characteristic abnormality detection circuit for the magnetic sensor.
2. Description of the Related Art
A magnetic sensor is widely used for detecting a movement or a rotation of various movable objects. For example, the magnetic sensor is used to detect opening and closing of a mobile phone, or to detect the rpm of a motor. In recent years, there is used a Hall element formed on a Si substrate, which is inexpensive but has low sensitivity and a high offset voltage. Then, offset voltages of the Hall element and an amplifier are cancelled by signal processing, to thereby realize a magnetic sensor which is inexpensive and has high magnetic detection precision.
FIG. 4 is a block diagram of a conventional magnetic sensor. A conventional magnetic sensor 10 includes a Hall element 2, a changeover switch circuit 30, an amplifier 4, a sampling circuit 5, a reference voltage circuit 60, a comparator 7, and an output circuit 8. The conventional magnetic sensor 10 operates as follows in order to cancel the offset voltage. The changeover switch circuit 30 switches current paths between respective two terminals on a diagonal line of the Hall element 2 in a complementary manner between a first period and a second period. The output voltage is amplified by the amplifier 4, and is held in a time division manner and averaged by the sampling circuit 5. The reference voltage circuit 60 outputs a reference voltage Vref. The comparator 7 compares the voltage held in the sampling circuit 5 and the reference voltage Vref, and determines the intensity of the magnetic field. The magnetic sensor 10 outputs the determination result via the output circuit 8, thereby outputting a detection signal corresponding to the magnetic field. The conventional magnetic sensor 10 operates as described above, and cancels the offset voltages of the Hall element and the amplifier by signal processing.
However, when Si is used as a material for the Hall element 2, the offset voltage is higher by several digits than a magnetic field signal voltage. There has been a problem in that, when the offset voltage is high, the offset voltage is not cancelled mainly due to saturation of the output voltage of the amplifier 4, and magnetic characteristics significantly deteriorate.